package com.kinderas.numbers
{
	/**
	 * Performs different number conversions 
	 * @author jorn.kinderas
	 * 
	 */	
	public class Conversion
	{
		public static function roundToDecimals(number:Number, decimalPlaces:uint = 1):Number{
			if(decimalPlaces < 1){
				return Math.round(number);
			}
			var str:String = "1";
			for(var i:uint=0;i<decimalPlaces;i++){
				str += "0";
			}
			var val:uint = parseInt(str);
			return int((number)*val)/val;
		}

	}
}